import request from '~/utils/resquest'

// 获取开关灯任务列表
export const getMonitoSwitchLightTaskList = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/taskList',
    method: 'get',
    params
  })

// 获取开关灯任务详情（包含周，全天等）
export const getMonitoSwitchLightTaskInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/view',
    method: 'get',
    params
  })

// 新增开关灯任务
export const addMonitoSwitchLightTaskInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/add',
    method: 'post',
    data: params
  })

// 修改开关灯任务
export const updateMonitoSwitchLightTaskInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/update',
    method: 'post',
    data: params
  })

// 删除开关灯任务
export const deleteMonitoSwitchLightTaskInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/remove',
    method: 'post',
    params
  })

// 获取周设置的日出日落时间明细
export const getWeekSunsierDetails = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/getWeekSunsier',
    method: 'get',
    params
  })

// 查询任务时间表
export const getTaskScheduleList = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/taskDetailList',
    method: 'get',
    params
  })
